﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Biz.Status;
using DataLogical;


namespace Biz.UserManagement
{
    public class Approver : Employee, IApplicationActor
    {
        private Application application = null;

        public static List<Approver> getAll()
        {
            return null;
        }

        public Approver(int _id)
            : base(_id)
        {
        }

        public Approver(int _id, Application _application)
            : base(_id)
        {
            application = _application;
        }

        public void CancelApplication()
        {
            application.Status = (ApplicationStatus)Factory.Factory.getInstance().CreateProduct(ApplicationStatus.StatusType.Cancelled.ToString());
        }

        public void Approve()
        {
            application.Status = (ApplicationStatus)Factory.Factory.getInstance().CreateProduct(ApplicationStatus.StatusType.Approved.ToString());
        }

        public System.Data.DataTable ListAllTreatApplication()
        {
            return ApplicationTreat.ListAllWithApprover(Id);
        }

        public System.Data.DataTable ListAllPresentApplication()
        {
            return ApplicationPresent.ListAllWithApprover(Id);
        }
    }
}
